home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / thor / uujoin.thor < prev    next >
Text File  |  1996-11-10  |  955b  |  50 lines

  1. /* UUJoin.thor by Troels Walsted Hansen
  2. ** $VER: UUJoin.thor v1.0 (28.05.95)
  3. **
  4. ** An ARexx script that saves parts of a split uuencoded file to a 
  5. ** tmpfile. When you have appended the last part, UUDecode.thor will
  6. ** decode the file.
  7. */
  8.  
  9. options results
  10.  
  11. /* needs THOR functions */
  12.  
  13. p = ' ' || address() || ' ' || show('P',,)
  14. thorport = pos(' THOR.',p)
  15.  
  16. if thorport > 0 then thorport = word(substr(p,thorport+1),1)
  17. else
  18. do
  19.     say 'No THOR port found!'
  20.     exit 10
  21. end
  22.  
  23. address(thorport)
  24.  
  25. /* save the message to a tmp file */
  26.  
  27. LOCKGUI
  28. msgfilename = 'T:JoinedUUEncodedFile.tmp'
  29.  
  30. SAVEMESSAGE CURRENT FILENAME msgfilename NOHEADER NOANSI
  31. if(rc ~= 0) then
  32. do
  33.     REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
  34.     UNLOCKGUI
  35.     exit
  36. end
  37.  
  38. UNLOCKGUI
  39.  
  40. /* ask whether this was the last part */
  41.  
  42. REQUESTNOTIFY TEXT '"Was this the last part?"' BT '"_Yes|_No"'
  43. if(result = 1) then
  44. do
  45.     address command
  46.     "rx `GetEnv THOR/THORPath`Rexx/UUDecode.thor " || msgfilename
  47. end
  48.  
  49. exit
  50.